namespace cpp thrift_codegen
namespace java com.jetbrains.cef.remote.thrift_codegen

struct RObject {
    1: required bool isNull = true,
    2: required i32 objId = -1,
    3: optional i32 flags,
    4: optional map<string, string> objInfo,
}

struct ResponseHeaders {
    1: required i32 length = 0,
    2: optional string redirectUrl,
}

struct ResponseData {
    1: optional bool continueRead,
    2: optional binary data,
    3: optional i32 bytes_read
}

struct PostDataElement {
    1: required bool isReadOnly,
    2: required i32 type = 0, // 'PDE_TYPE_EMPTY' by default
    3: optional string file,
    4: optional binary bytes,
}

struct PostData {
    1: required bool isNull = true,
    2: required bool isReadOnly,
    3: required bool hasExcludedElements,
    4: optional list<PostDataElement> elements,
}

struct KeyEvent {
    1: required string type,
    2: required i32 modifiers,
    3: required i32 windows_key_code,
    4: required i32 native_key_code,
    5: required bool is_system_key,
    6: required i16 character,
    7: required i16 unmodified_character,
    8: required bool focus_on_editable_field
}

struct Cookie {
    1: required string name,
    2: required string value,
    3: required string domain,
    4: required string path,
    5: required bool secure,
    6: required bool httponly,
    7: required i64 creation,
    8: required i64 lastAccess,
    9: optional i64 expires
}

struct Range {
    1: required i64 from,
    2: required i64 to
}

enum Style {
    SOLID,
    DOT,
    DASH,
    NONE
}

struct Color {
    1:i32 red,
    2:i32 green,
    3:i32 blue,
    4:i32 alpha
}

struct CompositionUnderline {
    1: required Range range,
    2: required Color color,
    3: required Color backgroundColor,
    4: required i32 thick,
    5: required Style style
}

